﻿
namespace ExtPageBuilder
{
    using Ext.Net;
    using System.Linq;
    using System.Collections.Generic;
    public partial class ExtPage
    {
        protected ExtPageType _PageType;
        protected bool _Editable;
        protected ExtPageBuilder.Object _PageObject;
        protected Toolbar _PageToolbar;
        protected string _LanguageID;
        protected Store _PageStore;

        public ExtPageType PageType
        {
            get { return _PageType; }
            set { _PageType = value; }
        }
        public bool Editable
        {
            get { return _Editable; }
            set { _Editable = value; }
        }
        public ExtPageBuilder.Object PageObject
        {
            get { return _PageObject; }
            set { _PageObject = value; this.PageObjectChanged(); }
        }
        public Toolbar PageToolbar
        {
            get { return _PageToolbar; }
            set { _PageToolbar = value; }
        }
        public string LanguageID
        {
            get { return _LanguageID; }
            set { _LanguageID = value; }
        }
        public Store PageStore
        {
            get { return _PageStore; }
            set { _PageStore = value; }
        }


        public virtual void BuilExtGrid()
        {
            this._LanguageID = "us-EN";
        }
        public virtual void BuilExtForm(bool editable)
        {
            this._LanguageID = "us-EN";
            this._Editable = editable;
        }
        public virtual void BuilExtForm(bool editable, string languageID)
        {
            this._LanguageID = languageID;
            this._Editable = editable;
            this._LanguageID = languageID;
        }
        protected virtual void PageObjectChanged()
        { }


    }

    public enum ExtPageType
    {
        Card,
        List,
        MultiList,
        CardMultiLine
    }
}
